import React from "react";

export default class ChildS extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
        value: "",
    };
  }
  componentDidMount() {
    this.setState({
        value: this.props.money * 7,
    });
  }
  chnageHandler = (e) => {
    this.setState({
        value: e.target.value,
    });
  };
  render() {
    return (
      <div>
        <div>美金</div>
        <input
          value={this.props.money*7}
          type="text"
          onChange={this.chnageHandler.bind(this)}
        />
      </div>
    );
  }
}
